package com.jarchie.htgl.network;

import com.jarchie.htgl.bean.ApproveListBean;
import com.jarchie.htgl.bean.ConDetailBean;
import com.jarchie.htgl.bean.ResultBean;
import com.jarchie.htgl.bean.UserLogin;
import com.jarchie.htgl.constants.UrlConstant;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by Jarchie on 2018\1\2.
 * 定义restFul请求的接口类
 */

public interface ApiService {

    //登录
    @FormUrlEncoded
    @POST(UrlConstant.LOGIN)
    Call<UserLogin> requestLogin(@Field("yhm") String yhm, @Field("kl") String kl);

    //合同未审批列表
    @FormUrlEncoded
    @POST(UrlConstant.APPROVE_LIST)
    Call<ApproveListBean> requestApproveList(@FieldMap Map<String, Object> map);

    //合同已审批列表
    @FormUrlEncoded
    @POST(UrlConstant.APPROVE_ALREADY_LIST)
    Call<ApproveListBean> requestAlreadyApproveList(@FieldMap Map<String, Object> map);

    //合同详情页数据
    @FormUrlEncoded
    @POST(UrlConstant.APPROVE_DETAIL)
    Call<ConDetailBean> requestConDetailData(@Field("htbh") String htbh);

    //POST提交合同审核
    @FormUrlEncoded
    @POST(UrlConstant.CONTRACT_APPROVE)
    Call<ResultBean> requestConApprove(@FieldMap Map<String, Object> map);

}
